Optimal. Leaf size=167 \[ a^3 A x+\frac {a \left (C \left (a^2+4 b^2\right )+6 A b^2\right ) \tan (c+d x)}{2 d}+\frac {b \left (12 a^2 (2 A+C)+b^2 (4 A+3 C)\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {b \left (2 a^2 C+b^2 (4 A+3 C)\right ) \tan (c+d x) \sec (c+d x)}{8 d}+\frac {a C \tan (c+d x) (a+b \sec (c+d x))^2}{4 d}+\frac {C \tan (c+d x) (a+b \sec (c+d x))^3}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.31, antiderivative size = 167, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {4057, 4056, 4048, 3770, 3767, 8} \[ \frac {a \left (C \left (a^2+4 b^2\right )+6 A b^2\right ) \tan (c+d x)}{2 d}+\frac {b \left (12 a^2 (2 A+C)+b^2 (4 A+3 C)\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {b \left (2 a^2 C+b^2 (4 A+3 C)\right ) \tan (c+d x) \sec (c+d x)}{8 d}+a^3 A x+\frac {a C \tan (c+d x) (a+b \sec (c+d x))^2}{4 d}+\frac {C \tan (c+d x) (a+b \sec (c+d x))^3}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3767
Rule 3770
Rule 4048
Rule 4056
Rule 4057
Rubi steps
\begin {align*} \int (a+b \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx &=\frac {C (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {1}{4} \int (a+b \sec (c+d x))^2 \left (4 a A+b (4 A+3 C) \sec (c+d x)+3 a C \sec ^2(c+d x)\right ) \, dx\\ &=\frac {a C (a+b \sec (c+d x))^2 \tan (c+d x)}{4 d}+\frac {C (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {1}{12} \int (a+b \sec (c+d x)) \left (12 a^2 A+3 a b (8 A+5 C) \sec (c+d x)+3 \left (2 a^2 C+b^2 (4 A+3 C)\right ) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {b \left (2 a^2 C+b^2 (4 A+3 C)\right ) \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a C (a+b \sec (c+d x))^2 \tan (c+d x)}{4 d}+\frac {C (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {1}{24} \int \left (24 a^3 A+3 b \left (12 a^2 (2 A+C)+b^2 (4 A+3 C)\right ) \sec (c+d x)+12 a \left (6 A b^2+\left (a^2+4 b^2\right ) C\right ) \sec ^2(c+d x)\right ) \, dx\\ &=a^3 A x+\frac {b \left (2 a^2 C+b^2 (4 A+3 C)\right ) \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a C (a+b \sec (c+d x))^2 \tan (c+d x)}{4 d}+\frac {C (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {1}{2} \left (a \left (6 A b^2+\left (a^2+4 b^2\right ) C\right )\right ) \int \sec ^2(c+d x) \, dx+\frac {1}{8} \left (b \left (12 a^2 (2 A+C)+b^2 (4 A+3 C)\right )\right ) \int \sec (c+d x) \, dx\\ &=a^3 A x+\frac {b \left (12 a^2 (2 A+C)+b^2 (4 A+3 C)\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {b \left (2 a^2 C+b^2 (4 A+3 C)\right ) \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a C (a+b \sec (c+d x))^2 \tan (c+d x)}{4 d}+\frac {C (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}-\frac {\left (a \left (6 A b^2+\left (a^2+4 b^2\right ) C\right )\right ) \operatorname {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{2 d}\\ &=a^3 A x+\frac {b \left (12 a^2 (2 A+C)+b^2 (4 A+3 C)\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a \left (6 A b^2+\left (a^2+4 b^2\right ) C\right ) \tan (c+d x)}{2 d}+\frac {b \left (2 a^2 C+b^2 (4 A+3 C)\right ) \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a C (a+b \sec (c+d x))^2 \tan (c+d x)}{4 d}+\frac {C (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 6.42, size = 1241, normalized size = 7.43 \[ \frac {\left (-4 A b^3-3 C b^3-24 a^2 A b-12 a^2 C b\right ) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) (a+b \sec (c+d x))^3 \left (C \sec ^2(c+d x)+A\right ) \cos ^5(c+d x)}{4 d (b+a \cos (c+d x))^3 (\cos (2 c+2 d x) A+A+2 C)}+\frac {\left (4 A b^3+3 C b^3+24 a^2 A b+12 a^2 C b\right ) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right ) (a+b \sec (c+d x))^3 \left (C \sec ^2(c+d x)+A\right ) \cos ^5(c+d x)}{4 d (b+a \cos (c+d x))^3 (\cos (2 c+2 d x) A+A+2 C)}+\frac {2 a^3 A (c+d x) (a+b \sec (c+d x))^3 \left (C \sec ^2(c+d x)+A\right ) \cos ^5(c+d x)}{d (b+a \cos (c+d x))^3 (\cos (2 c+2 d x) A+A+2 C)}+\frac {a b^2 C (a+b \sec (c+d x))^3 \left (C \sec ^2(c+d x)+A\right ) \sin \left (\frac {1}{2} (c+d x)\right ) \cos ^5(c+d x)}{d (b+a \cos (c+d x))^3 (\cos (2 c+2 d x) A+A+2 C) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^3}+\frac {2 (a+b \sec (c+d x))^3 \left (C \sec ^2(c+d x)+A\right ) \left (C \sin \left (\frac {1}{2} (c+d x)\right ) a^3+3 A b^2 \sin \left (\frac {1}{2} (c+d x)\right ) a+2 b^2 C \sin \left (\frac {1}{2} (c+d x)\right ) a\right ) \cos ^5(c+d x)}{d (b+a \cos (c+d x))^3 (\cos (2 c+2 d x) A+A+2 C) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}+\frac {2 (a+b \sec (c+d x))^3 \left (C \sec ^2(c+d x)+A\right ) \left (C \sin \left (\frac {1}{2} (c+d x)\right ) a^3+3 A b^2 \sin \left (\frac {1}{2} (c+d x)\right ) a+2 b^2 C \sin \left (\frac {1}{2} (c+d x)\right ) a\right ) \cos ^5(c+d x)}{d (b+a \cos (c+d x))^3 (\cos (2 c+2 d x) A+A+2 C) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}+\frac {\left (4 A b^3+3 C b^3+4 a C b^2+12 a^2 C b\right ) (a+b \sec (c+d x))^3 \left (C \sec ^2(c+d x)+A\right ) \cos ^5(c+d x)}{8 d (b+a \cos (c+d x))^3 (\cos (2 c+2 d x) A+A+2 C) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}+\frac {\left (-4 A b^3-3 C b^3-4 a C b^2-12 a^2 C b\right ) (a+b \sec (c+d x))^3 \left (C \sec ^2(c+d x)+A\right ) \cos ^5(c+d x)}{8 d (b+a \cos (c+d x))^3 (\cos (2 c+2 d x) A+A+2 C) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}+\frac {a b^2 C (a+b \sec (c+d x))^3 \left (C \sec ^2(c+d x)+A\right ) \sin \left (\frac {1}{2} (c+d x)\right ) \cos ^5(c+d x)}{d (b+a \cos (c+d x))^3 (\cos (2 c+2 d x) A+A+2 C) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^3}+\frac {b^3 C (a+b \sec (c+d x))^3 \left (C \sec ^2(c+d x)+A\right ) \cos ^5(c+d x)}{8 d (b+a \cos (c+d x))^3 (\cos (2 c+2 d x) A+A+2 C) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^4}-\frac {b^3 C (a+b \sec (c+d x))^3 \left (C \sec ^2(c+d x)+A\right ) \cos ^5(c+d x)}{8 d (b+a \cos (c+d x))^3 (\cos (2 c+2 d x) A+A+2 C) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 199, normalized size = 1.19 \[ \frac {16 \, A a^{3} d x \cos \left (d x + c\right )^{4} + {\left (12 \, {\left (2 \, A + C\right )} a^{2} b + {\left (4 \, A + 3 \, C\right )} b^{3}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (12 \, {\left (2 \, A + C\right )} a^{2} b + {\left (4 \, A + 3 \, C\right )} b^{3}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (8 \, C a b^{2} \cos \left (d x + c\right ) + 2 \, C b^{3} + 8 \, {\left (C a^{3} + {\left (3 \, A + 2 \, C\right )} a b^{2}\right )} \cos \left (d x + c\right )^{3} + {\left (12 \, C a^{2} b + {\left (4 \, A + 3 \, C\right )} b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{16 \, d \cos \left (d x + c\right )^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.30, size = 526, normalized size = 3.15 \[ \frac {8 \, {\left (d x + c\right )} A a^{3} + {\left (24 \, A a^{2} b + 12 \, C a^{2} b + 4 \, A b^{3} + 3 \, C b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - {\left (24 \, A a^{2} b + 12 \, C a^{2} b + 4 \, A b^{3} + 3 \, C b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (8 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 12 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 24 \, A a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 24 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 4 \, A b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 5 \, C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 24 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 12 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 72 \, A a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 40 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 4 \, A b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 24 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 12 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 72 \, A a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 40 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 4 \, A b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3 \, C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 8 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 12 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 24 \, A a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 24 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 4 \, A b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 5 \, C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{4}}}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.45, size = 267, normalized size = 1.60 \[ a^{3} A x +\frac {A \,a^{3} c}{d}+\frac {a^{3} C \tan \left (d x +c \right )}{d}+\frac {3 A \,a^{2} b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {3 C \,a^{2} b \sec \left (d x +c \right ) \tan \left (d x +c \right )}{2 d}+\frac {3 C \,a^{2} b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2 d}+\frac {3 A a \,b^{2} \tan \left (d x +c \right )}{d}+\frac {2 C a \,b^{2} \tan \left (d x +c \right )}{d}+\frac {C a \,b^{2} \tan \left (d x +c \right ) \left (\sec ^{2}\left (d x +c \right )\right )}{d}+\frac {A \,b^{3} \sec \left (d x +c \right ) \tan \left (d x +c \right )}{2 d}+\frac {A \,b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2 d}+\frac {b^{3} C \tan \left (d x +c \right ) \left (\sec ^{3}\left (d x +c \right )\right )}{4 d}+\frac {3 b^{3} C \sec \left (d x +c \right ) \tan \left (d x +c \right )}{8 d}+\frac {3 b^{3} C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.35, size = 254, normalized size = 1.52 \[ \frac {16 \, {\left (d x + c\right )} A a^{3} + 16 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} C a b^{2} - C b^{3} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 12 \, C a^{2} b {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 4 \, A b^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 48 \, A a^{2} b \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + 16 \, C a^{3} \tan \left (d x + c\right ) + 48 \, A a b^{2} \tan \left (d x + c\right )}{16 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 6.03, size = 1547, normalized size = 9.26 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \left (a + b \sec {\left (c + d x \right )}\right )^{3}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________